package cn.edu.scau.cmi.zhouxinyue.Singleton;

public class Chairman {
	private static Chairman instance;
	private String name = null;
	private static int number=0;
	private Chairman(String name) {
		this.name = name;
	}
	public static Chairman getInstance(String name) {
    	if(instance==null&&!name.equals(null)) {
    		instance=new Chairman(name);
    	}
    	return instance;
    }
	public String getname() {
		return name;
	}
	public static int getnumber() {
		return number;
	}
	public String showname() {
		String tip;
		if(number==0) {
			tip="您已创建主席:"+name;
			number=1;
		}
		else {
			tip="主席已存在!!";
		}
		return tip;
	}

}
